package com.aaronprj.common.enums;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public enum Category implements IEnumValueName{
	American(0,"AMERICAN"),
	Italian(1,"ITALIAN"),
	Pizza(2,"PIZZA"),
	Asian(3,"ASIAN"),
	Chinese(4,"CHINESE"),
	Sandwiches(5,"SANDWICHES");
	
	private int value;
	private String displayName;
	
	
	Category(int value, String displayName){
		this.value = value;
		this.displayName = displayName;
		
	}

	public int getValue() {
		return value;
	}


	public String getDisplayName() {
		return displayName;
	}


	public static List<Map<String, Object>> getEntities() {
		List<Map<String, Object>> enums = new ArrayList<Map<String, Object>>();
		for (Category e : Category.values()) {
			if (e instanceof Category) {
				Map<String, Object> map = new HashMap<String, Object>();
				map.put("name", e);
				map.put("displayName", e.getDisplayName());
				map.put("value", e.getValue());
				enums.add(map);
			}
		}
		return enums;
	}
	
	public static List<Category> getEntityList() {
		List<Category> enumes = new ArrayList<Category>();
		for (Category e : Category.values()) {
			if (e instanceof Category) {
				enumes.add(e);
			}
		}
		return enumes;
	}
	


}
